<app-header [title]="this.name.toUpperCase()+'矿工详情'"></app-header>

<ion-content>
<div class="fixed_box">
  <div class="segment w96">
    <ion-segment (ionChange)="ontabs(segmentAModel)" color="onbottom" [(ngModel)]="segmentAModel" mode="md">
      <ion-segment-button value="s1">
        <ion-label>收益历史</ion-label>
      </ion-segment-button>
      <ion-segment-button value="s2">
        <ion-label>我的矿工</ion-label>
      </ion-segment-button>
    </ion-segment>
  </div>

  <div class="segment_con" style="height: calc(100% - 5rem);overflow: hidden;">
    <ion-slides #slides (ionSlideDidChange)="slideChange()" style="height: 100%;overflow: hidden;">
      <ion-slide>
        <div class="segment_div">
          <div class="lj_tit">
            <p>{{addearnings}}</p>
            <span>累计收益(金币)</span>
          </div>
          <div class="sy_list w96" *ngIf="earningslist.length > 0">
            <ul>
              <li *ngFor="let item of earningslist">
                <p>{{item.name}}</p>
                <div>
                  <p>+{{item.amount}}</p>
                  <span>{{item.createTime}}</span>
                </div>
              </li>
            </ul>
          </div>
          <div *ngIf="earningslist.length == 0" class="none">暂无数据</div>
        </div>
      </ion-slide>

      <ion-slide>
        <div class="firendlist segment_div">
          <div class="lj_tit">
            <p>{{addstore}}</p>
            <span>累计业绩(T)</span>
          </div>
          <ul *ngIf="firendlist.length > 0">
            <li *ngFor="let item of firendlist" class="">
              <div class="fl-list">
                <img [src]="item.avater" alt="">
                <div> 
                  <p>{{item.nickname}}</p>
                  <p>{{item.phone.slice(0,3)}}****{{item.phone.slice(7,11)}}</p>
                </div>
              </div>
              <div class="fr-list">
                <span>{{item.name}}</span>
                <p>个人存储：{{item.storage}}T</p>
              </div>
            </li>
          </ul>
          <div class="none" *ngIf="firendlist.length == 0">
            暂无数据
          </div>
        </div>
      </ion-slide>

    </ion-slides>
  </div>
</div>

</ion-content>
